<template>
    <Head>
        <Title>Home</Title>
    </Head>
    <main>
        <!-- Banner Section -->
        <section class="banner banner--style2 position-relative padding-bottom ">
            <Banner />
        </section>
        <!-- Partners Section -->
        <section class="partner partner--style2 brand2-bg-4">
            <div class="container" data-aos="fade-up" data-aos-duration="1000">
                <Partners :partnerTwo="partnerTwo" />
            </div>
        </section>
        <div class="categories categories--style2 padding-top padding-bottom">
            <div class="container" data-aos="fade-up" data-aos-duration="1000" data-aos-delay="50">
                <Categories :categoryListTwo="categoryListTwo" />
            </div>
        </div>

        <section class="about about--style2 padding-bottom">
            <div class="container">
                <About />
            </div>
        </section>

        <section class="course course--style2 padding-top padding-bottom brand2-bg-4">
            <div class="container" data-aos="fade-up" data-aos-duration="1000">
                <LatestCourse :courses="homeCourses" />
            </div>
        </section>

        <CounterSection :counters="counters" />

        <div class="community community--style2 padding-top padding-bottom">
            <div class="container" data-aos="fade-up" data-aos-duration="1000" data-aos-delay="200">
                <Community />
            </div>
        </div>

        <section class="testimonial testimonial--style2 padding-top padding-bottom brand2-bg-3">
            <div class="container" data-aos="fade-up" data-aos-duration="1000">
                <Testimonial :testimonials="testimonials" />
            </div>
        </section>

        <section class="team team--style1 padding-top padding-bottom brand2-bg-2">
            <div class="container" data-aos="fade-up" data-aos-duration="1000">
                <Mentor :mentors="mentors.slice(4)" />
            </div>
        </section>

        <section class="blog blog--style2 padding-top padding-bottom">
            <div class="container" data-aos="fade-up" data-aos-duration="1000" data-aos-delay="100">
                <Blog :posts="homeBlogs" />
            </div>
        </section>
        <Newsletter2 />
    </main>
</template>

<script>
import Banner from '@/components/modules/index2/Banner.vue'
import Partners from '@/components/modules/index2/Partners.vue'
import Categories from '@/components/modules/index2/Categories.vue'
import About from '@/components/modules/index2/About.vue'
import LatestCourse from '@/components/modules/index2/LatestCourse.vue'
import CounterSection from '@/components/modules/index2/CounterSection.vue'
import Community from '@/components/modules/index2/Community.vue'
import Testimonial from '@/components/modules/index2/Testimonials.vue'
import Mentor from '@/components/modules/index2/Mentor.vue'
import Blog from '@/components/modules/index2/Blog.vue'
import Newsletter2 from '@/components/partials/newsletters/NewsletterThree.vue'
definePageMeta({
    layout: "index2",
});
export default {
    
    components: { Banner, Partners, Categories, About, LatestCourse, CounterSection, Community, Testimonial, Mentor, Blog, Newsletter2 },
    async setup() {
        const { axios } = fetchData()

        const homeCoursesResponse = await axios.get('/index2/home_courses.json')
        const homeCourses = homeCoursesResponse.data

        const generals = await axios.get('/general.json')
        const counters = generals.data.counters
        const categoryListTwo = generals.data.categoryListTwo

        const homeTestimonialsResponse = await axios.get('/index2/home_testimonials.json')
        const testimonials = homeTestimonialsResponse.data

        const mentor = await axios.get('/mentor.json')
        const mentors = mentor.data.mentors
        const partnerTwo = mentor.data.partnerTwo

        const homeBlogsResponse = await axios.get('/index2/home_blogs.json')
        const homeBlogs = homeBlogsResponse.data
        return {
            homeCourses,
            testimonials,
            counters,
            mentors,
            homeBlogs,
            partnerTwo,
            categoryListTwo
        };
    },
}
</script>

<style></style>